import java.util.Scanner;

public class demo3 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        System.out.println("请输入小王的性别a");
        String a= scanner.next();
        System.out.println("请输入小张的性别b");
        String b= scanner.next();
        if ((a.equals("男")&&b.equals("男"))||(a.equals("女")&&b.equals("女"))) {
            System.out.println("对不起,你们不能结婚");
        }else
            System.out.println("恭喜,你们可以结婚");
    }
}
